From: Jan Beulich Date: Thu, 21 Jun 2012 09:30:59 +0000 (+0200) Subject: x86/mm: fix mod_l1_entry() return value when encountering r/o MMIO page X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8315 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=70622118ee7bb925205c5d8c1e7bec82fc257351;p=xen.git x86/mm: fix mod_l1_entry() return value when encountering r/o MMIO page While putting together the workaround announced in http://lists.xen.org/archives/html/xen-devel/2012-06/msg00709.html, I found that mod_l1_entry(), upon encountering a set bit in mmio_ro_ranges, would return 1 instead of 0 (the removal of the write permission is supposed to be entirely transparent to the caller, even more so to the calling guest). Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 876e1ef2c7..ce0a67c1c8 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1875,6 +1875,7 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, break; case 1: l1e_remove_flags(nl1e, _PAGE_RW); + rc = 0; break; } if ( page )